package com.gohi.main.store.hbm.jdbcMapper;



import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.jdbc.core.RowMapper;

import com.gohi.main.store.hbm.ShopgooBeautician;
import com.gohi.main.store.hbm.ShopgooStore;
import com.gohi.main.store.hbm.ShopgooStoreClass;
import com.gohi.main.util.global.GloblConfig;
/**
 * 技师信息读取 包括跨表查询价格
 * @author Administrator
 *
 */
public class BeauticianMappers implements RowMapper  {

	@Override
	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		// TODO Auto-generated method stub
		ShopgooBeautician s =new ShopgooBeautician();
		s.setStore_name(rs.getString("store_name"));
		s.setBeautician_pic(GloblConfig.BEAUTICIAN+rs.getString("beautician_pic"));//图片
		s.setBeautician_id(rs.getInt("beautician_id"));//技师总数
		s.setOrder_num(rs.getInt("order_num"));//接单数
		s.setBeautician_name(rs.getString("beautician_name"));
		s.setBeautician_help(StringEscapeUtils.unescapeHtml(rs.getString("beautician_help")) );
		s.setBaojia(rs.getString("baojia"));
		s.setBad_num(rs.getInt("bad_num"));//差评数
		s.setGood_num(rs.getInt("good_num"));//好评数
		
		if(s.getBeautician_help().length()>70){
			s.setBasehelp(s.getBeautician_help().substring(0, 68));
		}else{
			s.setBasehelp(s.getBeautician_help());
		}
		//	s.setDescription(rs.getString("description"));//描述信息
		return s;
	}




	
}
